<?php

namespace app\common\validate;

use think\Validate;

class Address extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
    	'name' => 'require',
	    'mobile' => '/^1\d{10}$/',
	    'area_id' => 'require',
	    'address' => 'require',
    ];
    /**
     * 提示消息
     */
    protected $message = [
    	'name' => '收件人不能为空',
	    'mobile' => '手机号码格式不正确',
	    'area_id' => '请选择地区',
	    'address' => '请填写详细地址'
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => [],
        'edit' => [],
    ];
    
}
